package com.kun.spring;

import com.kun.spring.aop.HelloService;
import com.kun.spring.bean.Cat;
import com.kun.spring.bean.Person;
import com.kun.spring.config.MainConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Classname AnnotationMainTest
 * @Created by FangKun
 * @Date 2022/11/14 0014 下午 21:29
 */
public class AnnotationMainTest {
	public static void main(String[] args) {

		ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfig.class);

		HelloService helloService = applicationContext.getBean(HelloService.class);
		helloService.sayHello("fangkun");


	}
}
